// pages/business/menber-car/menber-car.js
var app=getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    imgUrls: [
    'https://ttjx-1302259601.cos.ap-beijing.myqcloud.com/media/upload/l/sp/lsp1ql5ksqch8mt1596869498.png',
    'https://ttjx-1302259601.cos.ap-beijing.myqcloud.com/media/upload/v/eg/vegxce1e2ncewet1596869562.png',
    'https://ttjx-1302259601.cos.ap-beijing.myqcloud.com/media/upload/g/n3/gn3e9sbrdbl1g261596869612.png'
    ],
    swiperIndex: 0,
    legal:[{value:"",icon:""}],
    hidePopup:true
  },
  bindchange(){
    console.log("swiper")
  },
  // 隐藏popup
  closeLogPopupTap(){
    this.setData({
      hidePopup:true
    })
  },
  showPopup(){
    this.setData({
      hidePopup:false
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },
  // 添加权益
  addPrice(){
    let legal = this.data.legal;
    legal.push({value:'',icon:''})
    this.setData({
      legal:legal
    })
  },
  // input框失去光标
  inputBlur(e){
    let index = e.currentTarget.dataset.index,value = e.detail.value;
    this.setData({
      ["legal["+index+"].value"]:value
    })
  },
  // 确定提交
  confrim(){
    var that = this;
    // wx.request({
    //   url: app.globalData.urls + '/manage/data',
    //   method: 'POST',
    //   data: {
    //     bdmin_user_id:""
    //   },
    //   header: app.getPostRequestHeader(),
    //   success: function (res) {
    //     console.log(res)
    //     if (res.data.code == '200') {
    //       var  data = res.data.data;
    //       
    //     }
    //   }
    // })
  },
})